{include file="../app/view/common/header.html" subtitle="文章列表" page="post_list"}
<style>
    .a {
        text-decoration: none;
        color: #4351AF;
    }
    
    /* 状态一: 未被访问过的链接 */
    .a:link {
        text-decoration: none;
        color: #4351AF;
    }
    
    /* 状态二: 已经访问过的链接 */
    .a:visited {
        text-decoration: none;
        color: #4351AF;
    }
    
    /* 状态三: 鼠标划过(停留)的链接(默认红色) */
    .a:hover {
        text-decoration: none;
        color: #4351AF;
    }
    /* 状态四: 被点击的链接 */
    .a:active {
        text-decoration: none;
        color: #AAD7F4;
    }
</style>
<script>type = '{$type}';setDrawer(type);</script>
<h1> </h1>
<div style="display: flex;">
    <button class="mdui-btn mdui-color-theme-accent mdui-ripple" style="left: 1%;width: 20%;" onclick="window.location.href='/post/edit/0'">写一篇新的！</button>
    <h1> </h1>
    <select class="mdui-select select-item" mdui-select id="type_select" style="margin-left: 80px;">
        <option value="all">所有类型</option>
    </select>
    <button class="mdui-btn mdui-color-theme-accent mdui-ripple" style="left: 1%;width: 10%;" onclick="window.location.href='/post/list/'+document.getElementById('type_select').value">看这个类型</button>
</div>

<div class="mdui-table-fluid">
    <table class="mdui-table mdui-table-hoverable">
      <thead>
        <tr>
          <th>#</th>
          <th>文章</th>
          <th>分区</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody id="table">
        
      </tbody>
    </table>
  </div>
<script>
    table = document.getElementById("table")
    var sub = `<tr onclick="window.location.href='/post/ID'">
            <td>ID</td>
            <td>TITLE</td>
            <td>TYPE</td>
            <td>CONTROL</td>
            </tr>`
</script>
<script src="/static/post/list.js"></script>